FSelect

Syntax: @FSelect mode, title, filters, return_str

The FSelect command can be used to display a standard Windows file selector dialog to the run time user. When the user then selects or enters a file name, the file name (including the full path name) is returned into the given string variable return_str. If the user presses the Cancel button the return string will be set to null.

The mode is a numeric parameter that specifies whether the displayed file selector is an Open dialog or a SaveAs dialog.

Value Dialog
1 Open
2 SaveAs

The title is a string parameter to give the title of the file selector dialog.

The filters parameter string specifies the file filters that appear in the bottom left of the dialog. The format for the string is:

Description_Text|Filter{|Description_Text|Filter}

The Return_string is a string variable where the result is to be returned. It also acts as the default file for the selector.

Example

@FSelect 1, 'Open Files', 'XpertRule Apps (*.XRA)|*.XRA|All Files (*.*)|*.*', strVar

This command line will display an Open file dialog with title of "Open Files" using two filters (*.XRA and *.*). These lines will appear in the List files of Type drop down list:

XpertRule Apps (*.XRA)

All File (*.*)

with the initial list showing any files with the .XRA extension. The path name selected will be returned into strVar.